<style type="text/css">
    .icon-source {
        background-image: url("./html/images/icon-source.png");
        background-repeat: no-repeat;
        color: #666666;
        float: right;
        line-height: 16px;
        <!--margin: 0 10px 10px 0;-->
        margin: 10 10px 10px 0;
        padding-left: 20px;
    }
    .icon-taobao {
        background-position: 0 0;
    }
    .icon-tmall {
        background-position: 0 -20px;
    }
    .icon-paipai {
        background-position: 0 -40px;
    }
    .icon-mbaobao {
        background-position: 0 -60px;
    }
    .icon-jingdong {
        background-position: 0 -79px;
    }
    .icon-vancl {
        background-position: 0 -99px;
    }
    .icon-paipai0 {
        background-position: 0 -139px;
    }
</style>
<form id="pagerForm" method="post" action="<?php echo site_url('index.php?m=baobeisource');?>">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="<?php echo $list['pager']->per_page;?>" />
    <input type="hidden" name="zh_name" value="<?php echo $_input->post('zh_name');?>" />
    <input type="hidden" name="en_name" value="<?php echo $_input->post('en_name');?>" />
    <input type="hidden" name="is_show" value="<?php echo $_input->post('is_show');?>" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<?php echo site_url('index.php?m=baobeisource');?>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					中文名称：<input type="text" name="zh_name" value="<?php echo $_input->post('zh_name');?>"/>
				</td>
                <td>
                    英文名称：<input type="text" name="en_name" value="<?php echo $_input->post('en_name');?>"/>
                </td>
                <td>是否显示：</td>
				<td>
					<select class="combox" name="is_show">
                        <option value="" <?php if($_input->post('is_show') == null) echo 'selected=""';?>>所有来源</option>
                        <option value="0" <?php if($_input->post('is_show') == 0 && $_input->post('is_show') != null) echo 'selected=""';?>>隐藏来源</option>
                        <option value="1" <?php if($_input->post('is_show') == 1) echo 'selected=""';?>>显示来源</option>
                    </select>
				</td>
                <td><div class="button"><div class="buttonContent"><button type="submit">检索</button></div></div></td>
			</tr>
		</table>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!--<li><a class="add" href="<?php echo site_url('index.php?m=baobeisource&a=add');?>" target="dialog" height="270" rel="add_baobeisource"><span>添加</span></a></li>
            <li class="line">line</li>-->
			<li><a class="edit" href="<?php echo site_url('index.php?m=baobeisource&a=edit');?>&id={sid}" target="dialog" height="270"><span>修改</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="112">
		<thead>
			<tr>
				<th width="10" align="center">ID</th>
				<th width="50" align="center">中文名称</th>
                <th width="50" align="center">英文名称</th>
                <th width="50" align="center">是否显示</th>
                <th width="50" align="center">添加时间</th>
                <th width="50" align="center">操作</th>
			</tr>
		</thead>
		<tbody>
            <?php foreach($list['rs'] as $v){?>
            <tr target="sid" rel="<?php echo $v['id'];?>">
                <td><?php echo $v['id'];?><!--<p class="icon-source <?php echo $v['icon_css'];?>">&nbsp;</p>--></td>
                <td><?php echo $v['zh_name'];?></td>
                <td><?php echo $v['en_name'];?></td>
                <td><?php echo $v['is_show'] ? '<span style="color:green;">是</span>':'<span style="color:red">否</span>';?></td>
                <td><?php echo $v['add_time'];?></td>
                <td><a href="<?php echo site_url('index.php?m=baobeisource&a=edit');?>&id=<?php echo $v['id'];?>" target="dialog" height="270" rel="edit_baobeisource">编辑</a></td>
            </tr>
            <?php }?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
            <?php
                $_pager_num_type = array(30,50,100);
            ?>
			<select class="combox" name="numPerPage" change="navTabPageBreak" param="numPerPage">
                <?php
                    foreach($_pager_num_type as $v){
                        echo '<option value="'.$v.'" '.($list['pager']->per_page == $v ? 'selected':'').'>'.$v.'</option>';
                    }
                ?>
			</select>
			<span>条，共<?php echo $list['pager']->getTotalCount();?>条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $list['pager']->getTotalCount();?>" numPerPage="<?php echo $list['pager']->per_page;?>" pageNumShown="5" currentPage="<?php echo $list['pager']->curr_page;?>"></div>

	</div>
</div>
